#include<iostream>
#include<string>
#include<sys/stat.h>
#include<fstream>
using namespace std;
bool IsRegular(std::string&filename){
            struct stat st;
            int ret=stat(filename.c_str(),&st);
            if(ret<0){
                return false;
            }
            return S_ISREG(st.st_mode);
        }
        int main(){
            string filename="../http////test.txt";
          //读取文件
          ifstream in(filename);
          in.seekg(0,ios::end);
          int length=in.tellg();
          in.seekg(0,ios::beg);
          char* buffer=new char[length];
          in.read(buffer,length);
          in.close();
          //输出文件内容
          cout<<buffer<<endl;

            return 0;
        }